<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BGroupBox</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BGroupBox">
			<h1>BGroupBox</h1>
			<p>继承自<a href="BWidget.html">BWidget</a></p>
			<p id="resume">BGroupBox是组合框，显示标题和线框以使一组控件呈现组合效果。<a href="#desc">详细</a></p><h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BGroupBox(BWidget*)">BGroupBox</a>(BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#BGroupBox(const BString&,BWidget*)">BGroupBox</a>(const BString&amp; title, BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#~BGroupBox()">~BGroupBox</a>();</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#setTitle(const BString&)">setTitle</a>(const BString&amp; title);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#setIcon(BIcon*)">setIcon</a>(BIcon* icon);</td></tr>
				<tr><td align="right">void </td><td><a href="#setTitleVisible(bool)">setTitleVisible</a>(bool titleVisible);</td></tr>
				<tr><td align="right">bool </td><td><a href="#titleVisible() const">titleVisible</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setTitleAlign(Align)">setTitleAlign</a>(Align titleAlign);</td></tr>
				<tr><td align="right">Align </td><td><a href="#titleAlign() const">titleAlign</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setTitleForm(Form)">setTitleForm</a>(Form titleForm);</td></tr>
				<tr><td align="right">Form </td><td><a href="#titleForm() const">titleForm</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setFlat(bool)">setFlat</a>(bool flat);</td></tr>
				<tr><td align="right">bool </td><td><a href="#flat() const">flat</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setWired(bool)">setWired</a>(bool wired);</td></tr>
				<tr><td align="right">bool </td><td><a href="#wired() const">wired</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setFolded(bool)">setFolded</a>(bool folded);</td></tr>
				<tr><td align="right">bool </td><td><a href="#folded() const">folded</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setCheckable(bool)">setCheckable</a>(bool checkable);</td></tr>
				<tr><td align="right">bool </td><td><a href="#checkable() const">checkable</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setChecked(bool)">setChecked</a>(bool checked);</td></tr>
				<tr><td align="right">bool </td><td><a href="#checked() const">checked</a>() const;</td></tr>
				<tr><td align="right">virtual BSize </td><td><a href="#sizeHint() const">sizeHint</a>() const;</td></tr>
				<tr><td align="right">using </td><td><a href="#BObject::query;()">BObject::query;</a></td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#query(const BString&, BValue&) const">query</a>(const BString&amp; text, BValue&amp; value) const;</td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">virtual void </td><td><a href="#resizeEvent(const BEvent&)">resizeEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#adjustEvent(const BEvent&)">adjustEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#styleEvent(const BEvent&)">styleEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#freshEvent(const BEvent&)">freshEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#paintEvent(const BEvent&)">paintEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#hoverEvent(const BEvent&)">hoverEvent</a>(const BEvent&amp; event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseEnterEvent(const BMouseEvent&)">mouseEnterEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseLeaveEvent(const BMouseEvent&)">mouseLeaveEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mousePressEvent(const BMouseEvent&)">mousePressEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseReleaseEvent(const BMouseEvent&)">mouseReleaseEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseMoveEvent(const BMouseEvent&)">mouseMoveEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseClickEvent(const BMouseEvent&)">mouseClickEvent</a>(const BMouseEvent&amp; mouseEvent);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>BGroupBox是组合框，显示标题和线框以使一组控件呈现组合效果。默认情况下顶部会分配一个字体的尺寸，其它三个部位分配二分之一字体尺寸。</p><p>组合框提供内容收起和展开的功能，使用方法setFolded(bool)可指定是否收起。</p><p>收起功能开启时所有上部以外其它部分的布局器会被隐藏，当状态转换为展开时这些布局器会显示。注意：不属于任何部位的自由布局器不受影响。</p><p>平坦性是指线框只显示在标题区域，其它部位不作处理。</p><p>可设置线框是否显示，有时需要更干净的视觉效果时会使用。</p><h4>信号表：</h4><table>
					<tr><td>Signal_AlignChanged</td><td>当标题栏的对齐方式被改变时发出，值为：Align titleAlign。</td></tr>
					<tr><td>Signal_FormChanged</td><td>当标题栏的显示形式改变时发出，值为：Form titleForm。</td></tr>
					<tr><td>Signal_Flat</td><td>当平坦性改变时发出，值为：bool flat。</td></tr>
					<tr><td>Signal_Wired</td><td>当是否显示线框被改变时发出，值为：bool wrired。</td></tr>
					<tr><td>Signal_Checkable</td><td>当选择操作开启状态被改变时发出，值为：bool checkable。</td></tr>
					<tr><td>Signal_Checked</td><td>当选中状态被改变时发出，值为：bool checked。</td></tr>
					<tr><td>Signal_Foldable</td><td>当收起功能开启或关闭时发出，值为：bool foldable。</td></tr>
					<tr><td>Signal_Folded</td><td>当收起状态被改变发出，值为：bool folded。</td></tr>
					<tr><td>Signal_Toggled</td><td>当标题被点击时，若开启了选择功能则发出，值为：bool checked。</td></tr></table>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BGroupBox(BWidget*)">
				<h3>BGroupBox(BWidget* parent = 0);</h3>
				<p>构造一个组合框，parent指定其父控件。</p>
			</div>
			<div id="BGroupBox(const BString&,BWidget*)">
				<h3>BGroupBox(const BString&amp; title, BWidget* parent = 0);</h3>
				<p>构造一个组合框，title指定其标题文本，parent指定其父控件。</p>
			</div>
			<div id="~BGroupBox()">
				<h3>~BGroupBox();</h3>
				<p>析构一个组合框。</p>
			</div>
			<div id="setTitle(const BString&)">
				<h3>virtual bool setTitle(const BString&amp; title);</h3>
				<p>重写控件的标题设置方法，标题文本改变时会重新绘制。</p>
			</div>
			<div id="setIcon(BIcon*)">
				<h3>virtual bool setIcon(BIcon* icon);</h3>
				<p>重写控件设置图标方法，图标改变时会重新绘制。</p>
			</div>
			<div id="setTitleVisible(bool)">
				<h3>void setTitleVisible(bool titleVisible);</h3>
				<p>设置是否显示标题。</p>
			</div>
			<div id="titleVisible() const">
				<h3>bool titleVisible() const;</h3>
				<p>获得当前标题栏是否显示。</p>
			</div>
			<div id="setTitleAlign(Align)">
				<h3>void setTitleAlign(Align titleAlign);</h3>
				<p>设置标题的对齐方式。</p>
			</div>
			<div id="titleAlign() const">
				<h3>Align titleAlign() const;</h3>
				<p>获得当前标题的对齐方式。</p>
			</div>
			<div id="setTitleForm(Form)">
				<h3>void setTitleForm(Form titleForm);</h3>
				<p>设置标题的显示形式。</p>
			</div>
			<div id="titleForm() const">
				<h3>Form titleForm() const;</h3>
				<p>设置标题的显示形式。</p>
			</div>
			<div id="setFlat(bool)">
				<h3>void setFlat(bool flat);</h3>
				<p>设置框体是否开启平坦模式。</p>
			</div>
			<div id="flat() const">
				<h3>bool flat() const;</h3>
				<p>获得框体是否开启平坦模式。</p>
			</div>
			<div id="setWired(bool)">
				<h3>void setWired(bool wired);</h3>
				<p>设置线框是否显示。</p>
			</div>
			<div id="wired() const">
				<h3>bool wired() const;</h3>
				<p>获得线框是否显示。</p>
			</div>
			<div id="setFolded(bool)">
				<h3>void setFolded(bool folded);</h3>
				<p>设置收起状态。</p>
			</div>
			<div id="folded() const">
				<h3>bool folded() const;</h3>
				<p>获得收起状态。</p>
			</div>
			<div id="setCheckable(bool)">
				<h3>void setCheckable(bool checkable);</h3>
				<p>设置是否开启选择模式。</p>
			</div>
			<div id="checkable() const">
				<h3>bool checkable() const;</h3>
				<p>获得是否开启选择模式。</p>
			</div>
			<div id="setChecked(bool)">
				<h3>void setChecked(bool checked);</h3>
				<p>设置选中状态，需要是开启选择模式。</p>
			</div>
			<div id="checked() const">
				<h3>bool checked() const;</h3>
				<p>获得选中状态。</p>
			</div>
			<div id="sizeHint() const">
				<h3>virtual BSize sizeHint() const;</h3>
				<p>计算合适的尺寸，需要尺寸足够标题显示。</p>
			</div>
			<div id="BObject::query;()">
				<h3>using BObject::query;</h3>
			</div>
			<div id="query(const BString&, BValue&) const">
				<h3>virtual bool query(const BString&amp; text, BValue&amp; value) const;</h3>
				<p>查询表：</p><table>
					<tr><td>header-rect</td><td>获得头部的矩形区域，值为：BRect headerRect。</td></tr>
					<tr><td>title-area</td><td>获得标题的区域，值为：BRect titleArea。</td></tr>
					<tr><td>text-area</td><td>获得标题显示区域，值为：BRect textArea。</td></tr>
					<tr><td>text-rect</td><td>获得标题绘制区域，值为：BRect textRect。</td></tr>
					<tr><td>icon-area</td><td>获得标题图标显示区域，值为：BRect iconArea。</td></tr>
					<tr><td>icon-rect</td><td>获得标题图标绘制区域，值为：BRect iconRect。</td></tr></table>
			</div>
			<div id="resizeEvent(const BEvent&)">
				<h3>virtual void resizeEvent(const BEvent&amp; event);</h3>
				<p>重新调整绘制布局。</p>
			</div>
			<div id="adjustEvent(const BEvent&)">
				<h3>virtual void adjustEvent(const BEvent&amp; event);</h3><p>由于增删布局器时会发生调整件，而增删布局器会影响到收起和展开，所以调整事件发生时重新调整布局。</p>
			</div>
			<div id="styleEvent(const BEvent&)">
				<h3>virtual void styleEvent(const BEvent&amp; event);</h3>
				<p>样式取值：</p><p>获得样式表设置了栖位大小则不对这些部位进行适应性调整。</p><table>
					<tr><td>Value_Form</td><td>取值为标题显示形式，值为：Form titleForm。</td></tr>
					<tr><td>Value_Align</td><td>取值为标题对齐方式，值为：Align titleAlign。</td></tr>
					<tr><td>Value_Spacing</td><td>取值为标题文本与图标的间隔，值为：int spacing。</td></tr>
					<tr><td>Value_Icon_Size</td><td>取得为标题图标的显示尺寸，值为：BSize iconSize。</td></tr>
					<tr><td>Value_Wire_Size</td><td>取值为线框的粗细，值为：int wireSize。</td></tr>
					<tr><td>Value_Flat</td><td>取值为平坦模式是否开启，值为：bool flat。</td></tr>
					<tr><td>Value_Wired</td><td>取值为线框是否显示，值为：bool wired。</td></tr></table><p>title子样式取值：</p><table>
					<tr><td>Value_Visible</td><td>取值为标题是否显示，值为：bool titleVisible。</td></tr>
					<tr><td>Value_Height</td><td>取值为标题的固定高度，值为：int titleHeight。</td></tr>
					<tr><td>Value_Form</td><td>取值为标题显示形式，值为：Form titleForm。</td></tr>
					<tr><td>Value_Align</td><td>取值为标题对齐方式，值为：Align titleAlign。</td></tr>
					<tr><td>Value_Spacing</td><td>取值为标题文本与图标的间隔，值为：int spacing。</td></tr>
					<tr><td>Value_Icon_Size</td><td>取得为标题图标的显示尺寸，值为：BSize iconSize。</td></tr>
					<tr><td>Value_Margin_Top</td><td>取值为标题内容的上边距，值为：int top。</td></tr>
					<tr><td>Value_Margin_Left</td><td>取值为标题内容的左边距，值为：int left。</td></tr>
					<tr><td>Value_Margin_Right</td><td>取值为标题内容的右边距，值为：int right。</td></tr>
					<tr><td>Value_Margin_Bottom</td><td>取值为标题内容的下边距，值为：int bottom。</td></tr></table>
			</div>
			<div id="freshEvent(const BEvent&)">
				<h3>virtual void freshEvent(const BEvent&amp; event);</h3>
				<p>自动调整四边栖位的大小，调整标题绘制布局。</p>
			</div>
			<div id="paintEvent(const BEvent&)">
				<h3>virtual void paintEvent(const BEvent&amp; event);</h3>
				<p>绘制标题和线框。注意如果没有图标且开启状态，则使用箭头颜色（Color_Arrow）绘制选中图样（Graph_Check）。</p>
			</div>
			<div id="hoverEvent(const BEvent&)">
				<h3>virtual void hoverEvent(const BEvent&amp; event);</h3>
				<p>处理标题悬停事件。</p>
			</div>
			<div id="mouseEnterEvent(const BMouseEvent&)">
				<h3>virtual void mouseEnterEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>清除悬停状态。</p>
			</div>
			<div id="mouseLeaveEvent(const BMouseEvent&)">
				<h3>virtual void mouseLeaveEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>清除悬停状态。</p>
			</div>
			<div id="mousePressEvent(const BMouseEvent&)">
				<h3>virtual void mousePressEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>更新标题的按下状态。</p>
			</div>
			<div id="mouseReleaseEvent(const BMouseEvent&)">
				<h3>virtual void mouseReleaseEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>更新标题的按下状态。</p>
			</div>
			<div id="mouseMoveEvent(const BMouseEvent&)">
				<h3>virtual void mouseMoveEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>更新标题的悬停状态。</p>
			</div>
			<div id="mouseClickEvent(const BMouseEvent&)">
				<h3>virtual void mouseClickEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>点击可能会颜色选中状态切换信号。</p>
			</div>
		</div>
	</body>
</html>